package o;

import android.os.Handler;
import android.os.Looper;
import android.os.Message;
import androidx.annotation.NonNull;
import com.huawei.appmarket.service.distribution.authentication.bean.AgdSecurityVerificationResponse;

public class dxu extends Handler {
    private dxv ˊ;
    private int ˎ = 0;

    dxu(Looper looper, dxv o_dxv) {
        super(looper);
        this.ˊ = o_dxv;
    }

    public void handleMessage(@NonNull Message message) {
        if (ˊ() == 4) {
            Logger.e("TaskMsgHandler", "can not receive any END msg");
            return;
        }
        switch (message.what) {
            case 1:
                if (ˊ() == 0) {
                    ˋ(1);
                    this.ˊ.ˊ();
                    return;
                }
                return;
            case 2:
                int ˊ = ˊ();
                ˋ(2);
                if (ˊ == 0) {
                    this.ˊ.ˊ(7);
                    return;
                } else if (ˊ == 1) {
                    this.ˊ.ˏ();
                    return;
                } else {
                    return;
                }
            case 3:
                removeMessages(1);
                removeMessages(2);
                Object obj = message.obj;
                if (obj instanceof dxo) {
                    dxo o_dxo = (dxo) obj;
                    int i = 0;
                    if ((o_dxo.ˏ instanceof AgdSecurityVerificationResponse) && o_dxo.ˏ.getResponseCode() == 0) {
                        i = ((AgdSecurityVerificationResponse) o_dxo.ˏ).ˊ();
                    }
                    if (ˊ() == 0) {
                        this.ˊ.ˊ(o_dxo.ˏ);
                    } else if (ˊ() == 1) {
                        this.ˊ.ˎ(o_dxo.ˏ);
                    } else if (ˊ() == 2) {
                        Logger.ˎ("TaskMsgHandler", "state has been DELAY_LONG, invalid store result");
                    }
                    ˋ(4);
                    this.ˊ.ॱ(o_dxo.ˊ, i);
                    return;
                }
                Logger.e("TaskMsgHandler", "can not find StoreBean");
                return;
            default:
                return;
        }
    }

    private int ˊ() {
        return this.ˎ;
    }

    private void ˋ(int i) {
        this.ˎ = i;
    }
}
